package br.com.ps.bombertournament.game.object;

import br.com.ps.bombertournament.game.BaseGameObject;
import br.com.ps.bombertournament.game.MappedGameObject;

public class Wall extends MappedGameObject {
	
	private String configurations;
	private boolean death;
	
	public Wall() {}
	
	public Wall(String configurations) {
		this.configurations = configurations;
	}
	
	@Override
	public String getMapPath() {
		return configurations != null ? configurations : super.getConfigurations().getString(MappedGameObject.CONFIGURATIONS_PROPERTY);
	}
	
	@Override
	public void onRemove() {
		// Do nothing
	}

	@Override
	public void onCollision(BaseGameObject other) {
		if (other instanceof BombFire && death == false) {
			death = true;
			super.play("WALL_FIRE");
		}
		
	}
}
